'\" te
.\" Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 1989 AT&T
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH UNSHARE_NFS 8 "May 6, 2003"
.SH NAME
unshare_nfs \- make local NFS file systems unavailable for mounting by remote
systems
.SH SYNOPSIS
.LP
.nf
\fBunshare\fR [\fB-F\fR nfs] \fIpathname\fR
.fi

.SH DESCRIPTION
.sp
.LP
The \fBunshare\fR command makes local file systems unavailable for mounting by
remote systems. The shared file system must correspond to a line with NFS as
the \fIFSType\fR in the file \fB/etc/dfs/sharetab\fR.
.SH OPTIONS
.sp
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-F\fR\fR
.ad
.RS 6n
This option may be omitted if NFS is the first file system type listed in the
file \fB/etc/dfs/fstypes\fR.
.RE

.SH FILES
.sp
.ne 2
.na
\fB\fB/etc/dfs/fstypes\fR\fR
.ad
.RS 22n

.RE

.sp
.ne 2
.na
\fB\fB/etc/dfs/sharetab \fR\fR
.ad
.RS 22n

.RE

.SH SEE ALSO
.sp
.LP
.BR attributes (7),
.BR nfsd (8),
.BR share (8)
.SH NOTES
.sp
.LP
If the file system being unshared is a symbolic link to a valid pathname, the
canonical path (the path which the symbolic link follows) will be unshared.
.sp
.LP
For example, if \fB/export/foo\fR is a symbolic link to \fB/export/bar\fR
(\fB/export/foo -> /export/bar\fR), the following \fBunshare\fR command will
result in \fB/export/bar\fR as the unshared pathname (and not
\fB/export/foo\fR):
.sp
.in +2
.nf
example#  unshare -F nfs /export/foo
.fi
.in -2
.sp

.sp
.LP
For file systems that are accessed by NFS Version 4 clients, once the unshare
is complete, all NFS Version 4 state (open files and file locks) are released
and unrecoverable by the clients. If the intent is to share the file system
after some administrative action, the NFS daemon (\fBnfsd\fR) should first be
stopped and then the file system unshared. After the administrative action is
complete, the file system would then be shared and the NFS daemon restarted.
See \fBnfsd\fR(8)
